A contact whose parent is a root is called a <#2713#><B>top-level</B><#2713#><A ID="2714"><tex2html_anchor_invisible_mark></A> contact. A top-level contact is usually
a composite at the top of a hierarchy
of other contacts created by an application program. A CLUE application program
will
normally create at least one top-level contact which encapsulates user
interaction for the application. More complex applications will often use multiple
top-level contacts, each representing distinct user tasks. Top-level contacts
play a special role in a user interface, because only top-level windows are
subject to a user's operations for window management (performed via a window
manager client) and for session management (performed via a session manager
client). Window managers, session managers, and the conventions for
intercommunication among these clients are described in [#icccm#<tex2html_cite_mark>#1##<tex2html_cite_mark>#].
In addition, a top-level contact is often used as a <#2718#><B>pop-up</B><#2718#><A ID="2719"><tex2html_anchor_invisible_mark></A>
--- for example, a menu which ``pops up'' when a command button contact is
``pressed.'' A top-level pop-up ``belongs'' to another contact without being
constrained by it in position, size, or stacking order. A top-level contact
therefore has both a parent, which is always a root, and an <#2720#><B>owner</B><#2720#><A ID="2721"><tex2html_anchor_invisible_mark></A><A ID="2722"><tex2html_anchor_invisible_mark></A>, from which it may inherit resources
values and other properties.
<P>
In order to simplify top-level contact programming, CLUE defines a composite
subclass called <#2723#><B>shells</B><#2723#><A ID="2724"><tex2html_anchor_invisible_mark></A>. A shell is a top-level contact which
merely acts as an invisible ``container'' for exactly one child. From an
application programmer's point of view, the child of a shell is really the
effective top-level contact. Programmer changes to the size of the child are
automatically applied to the shell, and user changes to the size of a shell are
automatically applied to its child. The slots of a shell instance contain
values which form the window properties used to communicate with window managers
and session managers. See [#icccm#<tex2html_cite_mark>#1##<tex2html_cite_mark>#] for a complete discussion of the
conventions for client window properties.<A ID="2726"><tex2html_anchor_invisible_mark></A><A ID="2727"><tex2html_anchor_invisible_mark></A>
<P>
Application programmers rarely need to operate on shells, other than to access
their property slots and change their state. In return, shells encapsulate the
responsibilities required of top-level windows and conveniently integrate
top-level pop-up's into the resource name hierarchy. All top-level contacts
should be shells; although this is not strictly required, the behavior of
non-shell top-level contacts is not guaranteed to be correct.